package cn.buk.tms.delivery.service;

import cn.buk.common.JsonResult;
import cn.buk.tms.entity.misc.DeliveryNote;
import cn.buk.tms.entity.misc.OperationLog;
import cn.buk.tms.sc.SearchFlightOrderCriteria;
import cn.buk.tms.delivery.dto.DeliveryNoteDto;
import java.util.Date;
import java.util.List;

/**
 * @author yfdai
 */
public interface DeliveryNoteService {

    /**
     * 查找配送单
     * @param enterpriseId
     * @param sc
     * @return
     */
    List<DeliveryNote> searchDeliveryNotes(final int enterpriseId, final SearchFlightOrderCriteria sc);


    DeliveryNoteDto getDeliveryNoteById(int enterpriseId, int orderId);

    /**
     * 开始处理配送单
     * @param enterpriseId
     * @param username
     * @param orderId
     * @return
     */
    JsonResult processDeliveryNote(int enterpriseId, String username, int orderId);

    JsonResult finishDeliveryNote(int enterpriseId, String username, int orderId, String remark);

    JsonResult cancelDeliveryNote(int enterpriseId, String username, int orderId, String remark);

    /**
     * 修改派送日期
     * @param enterpriseId
     * @param username
     * @param orderId
     * @param deliveryDate
     * @return
     */
    JsonResult updateDeliveryNoteDeliveryDate(int enterpriseId, String username, int orderId, Date deliveryDate);

    List<OperationLog> searchDeliveryNoteHistory(int enterpriseId, int orderId);


  JsonResult createDeliveryNote(int enterpriseId, String username, DeliveryNote dn);
}
